@layout("/common/_container.html",{js:["/assets/storage/storageStock/stockMonitor.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">Inventory Monitoring</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
		                    <div class="layui-inline">
		                        <select id="stockstate">
                            <option value="">Select Status</option>
                            <option value="IN_STOCK">IN_STOCK</option>
                            <option value="NOT_RECEIVED">NOT_RECEIVED</option>
                            <option value="FROZEN">FROZEN</option>
                        </select>
		                    </div>
		                    <div class="layui-inline">
		                        <select id="operateId">
                            <option value="">Select Department</option>
						            @for(item in basicOperatelist!){
						            <option value="${item.id}">${item.operateName}</option>
						            @}
		                        </select>
		                    </div>
		                    <div class="layui-inline">
		                        <select id="customerId">
                            <option value="">Select Customer</option>
						            @for(item in basicCustomerList!){
						            <option value="${item.id}">${item.customerName}</option>
						            @}
		                        </select>
		                    </div>
		                    <div class="layui-inline">
		                        <select id="warehouseId" lay-filter="warehouseId">
                            <option value="">Select Warehouse</option>
						            @for(item in basicWarehouseList!){
						            <option value="${item.id}">${item.warehouseName}</option>
						            @}
		                        </select>
		                    </div>
		                    <div class="layui-inline">
		                        <select id="areaId" lay-filter="areaId">
                            <option value="">Select Storage Area</option>
                        </select>
		                    </div>
		                    <div class="layui-inline" style="width: 180px;">
		                        <input id="positionNumber" class="layui-input" type="text" placeholder="Location Number" autocomplete="off" style="padding-right: 40px;"/>
		                        <button type="button" class="layui-btn layui-btn-primary" id="choicep" style="position: absolute;right: 1px;cursor: pointer;top: 2px"><i class="layui-icon">&#xe615;</i></button>
		                    </div>
		                    <div class="layui-inline" style="width: 180px;">
		                        <input id="goodsNumber" class="layui-input" type="text" placeholder="Product Code"/>
		                    </div>
		                    <div class="layui-inline" style="width: 180px;">
		                        <input id="goodsName" class="layui-input" type="text" placeholder="Product Name" autocomplete="off" style="padding-right: 40px;"/>
		                    </div>
		                    <div class="layui-inline" style="width: 180px;">
		                        <input id="goodsNo" class="layui-input" type="text" placeholder="Item No." autocomplete="off" style="padding-right: 40px;"/>
		                        <button type="button" class="layui-btn layui-btn-primary" id="choiceg" style="position: absolute;right: 1px;cursor: pointer;top: 2px"><i class="layui-icon">&#xe615;</i></button>
		                    </div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="startPutTime" class="layui-input" type="text" placeholder="Receipt Date From"/>
		                    </div>
                            <div class="layui-inline">
                            	一
                            </div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="endPutTime" class="layui-input" type="text" placeholder="Receipt Date To"/>
		                    </div>
							<div class="layui-inline" style="width: 160px;">
								<input id="goodsbatchs" class="layui-input" type="text" placeholder="Batch"/>
							</div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="startSingleTime" class="layui-input" type="text" placeholder="Production Date From"/>
		                    </div>
                            <div class="layui-inline">
                            	一
                            </div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="endSinglePutTime" class="layui-input" type="text" placeholder="Production Date To"/>
		                    </div>
		                    <div class="layui-inline">
		                        <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>Search</button>
		                    </div>
		                    <div class="layui-inline">
		                    	<button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>Export</button>
		                    </div>
		                    <div class="layui-inline">
				                <button id="btnExpBySpec" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>Export XLSX by Condition</button>
		                    </div>
							<div class="layui-inline">
								<button id="add" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>Add</button>
							</div>
							<div class="layui-inline">
								<button id="btnExpimport" class="layui-btn icon-btn"><i class="layui-icon">&#xe67c;</i>Initial Import</button>
							</div>
							<div class="layui-inline">
			        			<button id="btnRevoke" class="layui-btn layui-btn-danger icon-btn"><i class="layui-icon">&#xe640;</i>Batch Delete</button>
							</div>
	                    </div>
	                </div>
               		<table class="layui-table" id="storageStockTable" lay-filter="storageStockTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="todetailed">Transaction</a>
</script>
<script type="text/html" id="stockstateTpl">
  {{#  if(d.stockstate === 'In Stock'){ }}
    <span style="color: #43CF7C;font-weight: 600;">{{ d.stockstate }}</span>
  {{#  } else if(d.stockstate === 'Frozen'){ }}
    <span style="color: #e84d74;font-weight: 600;">{{ d.stockstate }}</span>
  {{#  } else { }}
    {{ d.stockstate }}
  {{#  } }}
</script>
@}